Making CGIs work with NetPresenz

Lets return to the Form used in the first example. The source to this form is displayed below:

<form action="../cgis/dump.cgi" method=get>
Enter your favourite colour:<BR><input type=text name=FavouriteColour size=80 maxlength=80><P>Select a phoneme:<BR><select name=list size=1><option value="iasinpeat" selected>i as in peat</option><option value="Iasinpit">I as in pit</option><option value="easinpet">e as in pet</option><option value="aeasinpat">ae as in pat</option><option value="a as in part">a as in part</option></select><P><input type=submit name="subscribe" value="Execute CGI">
</form>
The first line of this HTML is the FORM command, which tells the web browser that the contents of a FORM follows, and it also indicates to the browser what CGI it should tell the server to run when you use the Execute CGI button. The path is relative to the script which is calling it. (So in this case it says 'Go up one directory, go into the cgis directory and execute the script called dump.cgi'.)

On the other hand, in the second example script the FORM command is:

<form action="/cgis/dump.cgi" method=post>
...this time the path to the CGI is an absolute path from the Web Root directory you defined in NetPresenz Setup.

Note that specifying which CGI to execute by using a relative path from the script, or an absolute path from the Web Root directory is fairly unique to NetPresenz. Most Web servers have a seperate directory called cgi-bin where CGIs are stored and the CGI is referenced relative to that directory. This nomenclature is inherited from Unix systems.

Previous Back to Start
Some Simple Examples Introduction to CGIs